Optimal. Leaf size=79 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {a-b} d}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3757, 205, 214}
\begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} d \sqrt {a-b}}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 214
Rule 3757
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (a-(a-b) x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\sin (c+d x)\right )}{2 a d}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {a-b} d}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 75, normalized size = 0.95 \begin {gather*} \frac {\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}+\frac {\sqrt {a} \sin (c+d x)}{a+(-a+b) \sin ^2(c+d x)}}{2 a^{3/2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 80, normalized size = 1.01
method | result | size |
derivativedivides | \(\frac {-\frac {\sin \left (d x +c \right )}{2 a \left (a \left (\sin ^{2}\left (d x +c \right )\right )-b \left (\sin ^{2}\left (d x +c \right )\right )-a \right )}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{2 a \sqrt {a \left (a -b \right )}}}{d}\) | \(80\) |
default | \(\frac {-\frac {\sin \left (d x +c \right )}{2 a \left (a \left (\sin ^{2}\left (d x +c \right )\right )-b \left (\sin ^{2}\left (d x +c \right )\right )-a \right )}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{2 a \sqrt {a \left (a -b \right )}}}{d}\) | \(80\) |
risch | \(-\frac {i \left ({\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{a d \left (a \,{\mathrm e}^{4 i \left (d x +c \right )}-b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{4 \sqrt {a^{2}-a b}\, d a}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{4 \sqrt {a^{2}-a b}\, d a}\) | \(192\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.90, size = 266, normalized size = 3.37 \begin {gather*} \left [\frac {{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {a^{2} - a b} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - a b} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + 2 \, {\left (a^{2} - a b\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} d\right )}}, -\frac {{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {-a^{2} + a b} \arctan \left (\frac {\sqrt {-a^{2} + a b} \sin \left (d x + c\right )}{a}\right ) - {\left (a^{2} - a b\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{3}{\left (c + d x \right )}}{\left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.73, size = 91, normalized size = 1.15 \begin {gather*} \frac {\frac {\arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} a} - \frac {\sin \left (d x + c\right )}{{\left (a \sin \left (d x + c\right )^{2} - b \sin \left (d x + c\right )^{2} - a\right )} a}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.94, size = 187, normalized size = 2.37 \begin {gather*} \frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{a}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (4\,b-2\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {\mathrm {atanh}\left (\frac {4\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^{3/2}\,\sqrt {a-b}\,\left (\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a-b}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a}+\frac {2}{a}-\frac {2}{a-b}+\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a\,b-a^2}\right )}\right )}{2\,a^{3/2}\,d\,\sqrt {a-b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________